fix(activitylistmodel): fix activities for e2ee files
authorJyrki Gadinger <nilsding@nilsding.org>
Mon, 16 Jun 2025 08:09:38 +0000 (10:09 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 16 Jun 2025 13:10:13 +0000 (13:10 +0000)
the sharing/activity button was supposed to be hidden, but a later
change forgot to adapt the variable used for querying the file metadata
so it never could determine the e2e-status

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
src/gui/tray/activitylistmodel.cpp

index 8e6df96921533ff0c4318500d0edd88a374b7726..4a4f3f807f10b40a3c15b460769540a00a88b2ab 100644 (file)
@@ -166,7 +166,7 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
             // If this is an E2EE file or folder, pretend we got no path, hiding the share button which is what we want
             if (folder) {
                 SyncJournalFileRecord rec;
-                if (!folder->journalDb()->getFileRecord(fileName.mid(1), &rec)) {
+                if (!folder->journalDb()->getFileRecord(relPath.mid(1), &rec)) {
                     qCWarning(lcActivity) << "could not get file from local DB" << fileName.mid(1);
                 }
                 if (rec.isValid() && (rec.isE2eEncrypted() || !rec._e2eMangledName.isEmpty())) {